'use strict';
let Response = require('../../../model/Response');
let RestifyProxy = require('../../../util/RestifyProxy');
let CustomPageBean = require('../../../model/CustomPageBean');
let AgentService = require('../../../service/AgentService');
let logger = require('../../../util/LoggerUtil').logger('AgentController.js');

/**
 * 动态利用率统计-页面
 */
module.exports.agentPage = function () {
    let response = new Response();
    response.render('back/statistic-analysis/agent-statistic');
    this.resolve(response);
};
/**
 * 动态利用率统计饼状图
 */
module.exports.getPie = async function () {
    let req = this.req;
    let params = req.body;
    let response = new Response();
    try {
        let result = await AgentService.getPie(this, params);
        response.send(result);
    } catch (error) {
        logger.error(error);
    }
    this.resolve(response);
};